/**
 * Project: topdt-jbpm
 * Copyright 2013  Top Digital Technology  Co. Ltd.
 * All right reserved.
 */
package com.topdt.jbpm.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

/**
 * 建立日期 : 2013-4-25 下午12:03:54<br>
 * 作者 : balance<br>
 * 模块 : <br>
 * 描述 : <br>
 * 修改历史: 序号 日期 修改人 修改原因 <br>
 * 1 <br>
 * 2 <br>
 */
@Entity
@Table(name = "wf_hist_todo")
public class HistTodo extends JbpmModel{

	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "uuid")
	@Column(length = 32)
	private String histId;
	private String todoId;
	private String todoTitle;
	private String taskId;
	private String fromUser;
	private String toUser;
	private Date arriveTime;
	private Date finishTime;
	private String activityName;
	private String destActivityName;// 目的环节名称
	private String state;
	private String workId;
	private String appName;
	private String preActivityName;
	private long batch;// 批次

	@Column(name = "seq_num")
	private int seqNUM;// 排序

	private String todoMode;// 模式
	
	/*
	 * wangxufeng add 2014-12-04
	*查询人员范围id字符串，以,号隔开
	*/
	@Transient
	private String perIds;
	@Transient
	private String handleUserName; //处理人名称
	@Transient
	private String deptName; //部门名称
	@Transient
	private String deptId; //部门Id
	@Transient
	private String avgHandleTime; //平均处理时间
	public String getHandleUserName() {
		return handleUserName;
	}

	public void setHandleUserName(String handleUserName) {
		this.handleUserName = handleUserName;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public String getAvgHandleTime() {
		return avgHandleTime;
	}

	public void setAvgHandleTime(String avgHandleTime) {
		this.avgHandleTime = avgHandleTime;
	}

	public HistTodo() {

	}

	public HistTodo(Todo todo) {
		this.activityName = todo.getActivityName();
		this.arriveTime = todo.getArriveTime();
		this.fromUser = todo.getFromUserId();
		this.state = todo.getState();
		this.taskId = todo.getTaskId();
		this.todoId = todo.getTodoId();
		this.todoTitle = todo.getTodoTitle();
		this.toUser = todo.getToUserId();
		this.workId = todo.getWorkId();
		this.batch = todo.getBatch();
		this.todoMode = todo.getTodoMode();
		this.seqNUM = todo.getSeqNUM();
		this.destActivityName = todo.getDestActivityName();
		this.appName = todo.getAppName();
		this.preActivityName = todo.getPreActivityName();
		this.companyId=todo.getCompanyId();
	}

	public String getDestActivityName() {
		return destActivityName;
	}

	public void setDestActivityName(String destActivityName) {
		this.destActivityName = destActivityName;
	}

	public int getSeqNUM() {
		return seqNUM;
	}

	public void setSeqNUM(int seqNUM) {
		this.seqNUM = seqNUM;
	}

	public String getTodoMode() {
		return todoMode;
	}

	public void setTodoMode(String todoMode) {
		this.todoMode = todoMode;
	}

	public long getBatch() {
		return batch;
	}

	public void setBatch(long batch) {
		this.batch = batch;
	}

	public String getHistId() {
		return histId;
	}

	public void setHistId(String histId) {
		this.histId = histId;
	}

	public String getTodoTitle() {
		return todoTitle;
	}

	public void setTodoTitle(String todoTitle) {
		this.todoTitle = todoTitle;
	}

	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	public String getFromUser() {
		return fromUser;
	}

	public void setFromUser(String fromUser) {
		this.fromUser = fromUser;
	}

	public String getToUser() {
		return toUser;
	}

	public void setToUser(String toUser) {
		this.toUser = toUser;
	}

	public Date getArriveTime() {
		return arriveTime;
	}

	public void setArriveTime(Date arriveTime) {
		this.arriveTime = arriveTime;
	}

	public Date getFinishTime() {
		return finishTime;
	}

	public void setFinishTime(Date finishTime) {
		this.finishTime = finishTime;
	}

	public String getActivityName() {
		return activityName;
	}

	public void setActivityName(String activityName) {
		this.activityName = activityName;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getWorkId() {
		return workId;
	}

	public void setWorkId(String workId) {
		this.workId = workId;
	}

	public String getTodoId() {
		return todoId;
	}

	public void setTodoId(String todoId) {
		this.todoId = todoId;
	}

	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}

	public String getPreActivityName() {
		return preActivityName;
	}

	public void setPreActivityName(String preActivityName) {
		this.preActivityName = preActivityName;
	}

	public String getPerIds() {
		return perIds;
	}

	public void setPerIds(String perIds) {
		this.perIds = perIds;
	}

	public String getDeptId() {
		return deptId;
	}

	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}

	

}
